<script>on doItglobal lastSurveyCard, onLineput the short name of the target into surveyResultput "no" into foundItrepeat with X = 1 to the number of lines in bg field "Results"if item 1 of line X of bg field "Results" is surveyResult thenadd 1 to item 2 of line x of bg field "Results"put "yes" into foundItexit repeatend ifend repeatif foundIt is "no" thenput surveyResult & "," & 1 & return after bg field "Results"end ifput 0 into tallyrepeat with X = 1 to the number of lines in bg field "Results"add item 2 of line X of bg field "Results" to tallyend repeatrepeat with X = 1 to the number of lines in bg field "Results"put item 1 of line x of bg field "Results" into word1put item 2 of line x of bg field "Results" into amt1put (amt1/tally) * 100 into percentageset numberFormat to "#0.##"put percentage & "% voted " & word1 & " (" & amt1 & " people)"¬into sendMeif onLine thensendString sendMeelseput sendMe & "..."wait until the mouseClickend ifend repeatif the id of this card is lastSurveyCard thenpop cardelsego next cardend ifend doIt</script>